The Routes to School Add-In relies on a database of schools. This must be a Microsoft Access database in either .mdb or .accdb format.
The Routes to School add-in relies on four tables as follows:
Schools
Every school must have a unique reference and also a name. Both these fields are text fields. For example:
“9876” “Thomas Alleyne Academy”
Locations
A school must have one or more locations. Each location contains the school reference (from the schools table), a text description, and a co-ordinate in the form of an easting and northing which are held in numeric fields. For example:
“9876” “Old Town Entrance” 523290 225588
“9876” “Western Road Entrance” 523998 225800
Tags
Tags classify schools. A tag consists of a numeric key and the tag description. For example:
8 Infant
9 Junior
SchoolTags
This table exists to associate tags with schools. Each record holds a tag key and a school reference. For example, the Thomas Alleyne Academy can be classified as Voluntary controlled and Community.
The relationship between these tables is shown below:
This structure allows the Routes to School add-in to:
The sample database contains two queries. These are not used by the add-in they are included solely to assist with browsing the data in Access.
The Routes to School add-in is interested only in the columns in the tables as described above. Any other columns and or tables are ignored.
The names of the tables and columns of interest used by the add-in can be configured to match an existing database. This is controlled via the add-in’s configuration file (routesToSchool.config). See the following:
<schoolDatabase>
<schoolTable>
<tableName>Schools</tableName>
<schoolRefColumn>SchoolRef</schoolRefColumn>
<schoolNameColumn>SchoolName</schoolNameColumn>
</schoolTable>
<locationsTable>
<tableName>Locations</tableName>
<schoolRefColumn>SchoolRef</schoolRefColumn>
<locationNameColumn>Description</locationNameColumn>
<eastingColumn>Easting</eastingColumn>
<northingColumn>Northing</northingColumn>
</locationsTable>
<tagsTable>
<tableName>Tags</tableName>
<tagIdColumn>TagNo</tagIdColumn>
<tagValue>SchoolTag</tagValue>
</tagsTable>
<schoolTabs>
<tableName>SchoolTags</tableName>
<schoolRefColumn>SchoolRef</schoolRefColumn>
<tagIdColumn>TagNo</tagIdColumn>
</schoolTabs>
</schoolDatabase>
Note: Column data type is not configurable, e.g. the school reference must be text and co-ordinate values must be in numeric fields.
The configuration file also contains a section for ‘map’ settings:
<map>
<routePen>P_SOLID_255:0:0_-100R_0</routePen>
<networkSnapRadius>1000</networkSnapRadius>
<networkFindNearestLimit>100000</networkFindNearestLimit>
<itemMarginCm>1.0</itemMarginCm>
</map>
<routePen>
This is the style in which routes are drawn/plotted. This can be any SIS pen definition.
<networkSnapRadius>
In network routing, this value controls how far from the network an address can be for the point to be snapped to the network. This value is in metres. The default value is 1000 (1Km).
<networkFindNearestLimit>
In network routing, this value controls the maximum distance along the network the calculation will run. This value is in metres. The default is 100000 (100Km).
<itemMarginCm>
When a route is printed (Single Measurement / Print) this value will control how far away from the edge of the map the start and end points will be. This value is in centimetres on the paper map. The default value is 1cm.
The add-in includes a NOL containing a sample print template for Single Measurement / Print. This is: RoutesToSchool.A4 Portrait.
This template can be customised using the standard Cadcorp SIS print template methods. See the SIS Help Printing and Print Templates section.
The SampleSchools.accdb database provided with the installation is shown below for reference.
Send comments on this topic.
Click to return to www.cadcorp.com
© Copyright 2000-2017 Computer Aided Development Corporation Limited (Cadcorp).